﻿<?session_start();
if(!defined('sugarEntry'))define('sugarEntry', true);
/*********************************************************************************
module : vng sales marketing
author : hoanghd@vinagame.com.vn
********************************************************************************/
require_once('XTemplate/xtpl.php');
require_once('log4php/LoggerManager.php');
require_once('include/modules.php');
require_once('modules/ZT2Remit/ZT2Remit.php');
//require_once('modules/ZT2Remit/List.php');


global $current_language;
global $app_strings;
global $app_list_strings;
global $theme;
$theme_path = 'themes/' . $theme . '/';
$image_path = $theme_path .'images/';
require_once($theme_path . 'layout_utils.php');
global $mod_strings;
global $current_user;

$seed = new ZT2Remit_Ext();

//$_type =$_POST['tp'];


$_id =$_POST["id"];



//$_rand =$_POST['rnd']!=''?$_POST['rnd']:$_GET['rnd'];
$fnc = new FNC();

$msg = '';

//$_type = $fnc->iif($_type=='',$_GET['tp'],$_type);


// kiem tra quyen access 
if ($seed->ACLAccess('view'))
 {
	ob_start();
    // code 
    if ($_id !='' )
    {
                $list_form = new XTemplate('modules/ZT2Remit/d.html');	
                
				$sSQL="usp_ZT2_Remit_be_PlayingTime_Detail_List".$_id ;		
				//echo $sSQL;
				$seed->ws_debug($sSQL);				
				$result = $seed->db->query($sSQL, true, "Query failed");			
				while ($aR = $seed->db->fetchByAssoc($result))
				{
				    
					 $_recordDate = $aR['RecordDate'];                    
                     $_acountPM = $aR['CSMID']; 				
                     $_pcName = $aR['PCName'];
                   	 $_playingTime = $aR['PlayingTime'];
                     
                     
                    $msg.='<td  style="text-align:left">'.$STT.'</td>';                    
                    $msg.='<td  style="text-align:left">'.$fnc->date2vndate($_recordate,false).'</td>';
                    $msg.='<td  style="text-align:left">'.$_pcName.'</td>';
                    $msg.='<td  style="text-align:left">'.$_playingTime.'</td>';                         			
				
               	}
                //die($msg);
                $list_form->assign('gridview',$msg);
                $list_form->parse('main');
		      	$info = $list_form->out_return('main');	
	
		       die($info);	
        
                	
                
                
     } 
}else
{
    die("ko dx vao");
		sugar_die('You do not have access to this area. Contact your site administrator to obtain access.');	
	}
    

	
class ZT2Remit_Ext  extends ZT2Remit
{




}
?>
